<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="https://cdn.bootcss.com/Mock.js/1.0.1-beta3/mock-min.js"></script>
    <script src="https://cdn.bootcss.com/jquery/3.5.0/jquery.min.js"></script>
    <script src="https://cdn.bootcss.com/vue/2.6.11/vue.min.js"></script>
    <script src="https://cdn.bootcss.com/axios/0.19.2/axios.min.js"></script>
</head>
<body>
    <div id="app">
        <div>{{msg}}</div>
        <ul>
            <li v-for="(item,index) in list" :key="index">
                <img :src="item.img" alt="">
                <span>{{item.name}}</span>
                <span>{{item.age}}</span>
            </li>
        </ul>
    </div>
    <script>
        //模拟的mockjs接口
       Mock.mock('userlist',{
            "list|5-10":[
                {
                    "id|+1":1,
                    "name":"@cname",
                    "age|20-30":1,
                    "img":"@image(50x50,#00ffcc,ITWEB)"
                }
            ]
       }) 
       var vm=new Vue({
           el:"#app",
           data:{
               msg:"我是引入进来的vue",
               list:[]
           },
           mounted(){
            //axios方法
             axios.get('userlist')
             .then(res=>{
                 console.log(res.data.list)
                 this.list=res.data.list
             })
           }
       })
       //jquery方法
       $.get('userlist',data=>{
           console.log( JSON.parse(data))
       })
    </script>
</body>
</html>